package com.example.evaluate.mapper;

import com.example.evaluate.model.Teacher;
import com.example.evaluate.model.TeacherAndStudent;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentTeacherMapper {
    /**
     * 增加一条老师学生记录
     * */
    int addStudentTeacher(TeacherAndStudent teacherAndStudent);

    /**
     * 删除一条老师学生记录
     * */
    int deleteStudentTeacherByStudentId(int studentId);

    /**
     * 通过学生找所有老师
     * */
    List<Teacher> findAllTeacherByStudentId(int studentId);


    /**
     * 通过学生id找未评教的老师
     * */
    List<Teacher> findTeacherByStudentId(int studentId);

    /**
     * 通过学生id找已评教的老师
     * */
    List<Teacher> findTeacherByStudentId2(int studentId);

    /**
     * 通过老师名字找老师
     * */
    List<Teacher> findTeacherByParams1(@Param("studentId") int studentId, @Param("param")String param);

    /**
     * 通过老师课程找老师
     * */
    List<Teacher> findTeacherByParams2(@Param("studentId") int studentId, @Param("param")String param);

}
